package com.ali.aliwebsite.mapper;

import com.ali.aliwebsite.entity.SwiptText;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SwipeTextMapper {
    @Select("select * from swipetext")
    List<SwiptText> selectAll();

    @Update("UPDATE swipetext SET text1 = #{text1} WHERE id = #{id}")
    public int updateText1(@Param("text1") String text1, @Param("id") int id);

    @Update("UPDATE swipetext SET text2 = #{text2} WHERE id = #{id}")
    public int updateText2(@Param("text2") String text2, @Param("id") int id);


}
